CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

PROJECT(ZIPSTREAM) 

IF(CMAKE_COMPILER_IS_GNUCC)
	SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -Wno-deprecated")
ENDIF(CMAKE_COMPILER_IS_GNUCC)

IF(MSVC OR MSVC_IDE OR MSVC60 OR MSVC70 OR MSVC71 OR MSVC80 OR CMAKE_COMPILER_2005 OR MSVC90)
	SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W0")
ENDIF(MSVC OR MSVC_IDE OR MSVC60 OR MSVC70 OR MSVC71 OR MSVC80 OR CMAKE_COMPILER_2005 OR MSVC90)

IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
	ADD_DEFINITIONS(-D__DEBUG__)
	IF(CMAKE_COMPILER_IS_GNUCC)
		SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
	ENDIF(CMAKE_COMPILER_IS_GNUCC)
ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug")

INCLUDE_DIRECTORIES("src")

SET(EXECUTABLE_OUTPUT_PATH "bin")
ADD_DEFINITIONS()

FILE(GLOB_RECURSE ZIPSTREAM_SRC src/*.cpp src/*.h)
FILE(GLOB_RECURSE ZIPPY_SRC examples/zippy.cpp examples/zippy.h)

ADD_EXECUTABLE(zippy ${ZIPSTREAM_SRC} ${ZIPPY_SRC})
TARGET_LINK_LIBRARIES(zippy z) 
